<%@ page language="java" import="java.util.*, com.rmt.www.vo.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'trace.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script type="text/javascript" language="javascript" src="js/jquery-1.7.1.js"></script>
	<link href="css/Site.css" rel="stylesheet" type="text/css" />
 <script>
		$(function(){
			$('input[value="view"]').click(function(){
				from=$('select[name="from"]').attr('value');
				to=$('select[name="to"]').attr('value');
				pid=$('input.pid').attr('value');
			  	url='getTrace?from='+from+'&'+'to='+to+'&pid='+pid;
					$.ajax({
					  url:url ,
					  cache: false
					}).done(function(html){
						$('#matrix').html(html);
					});
				 
			});
		
		});
		</script>
  </head>
  
  <body>
  	<div class='page' style='background-color: #5c87b2' id='wrap'>
    <div id="header">
            <div id="title" >
                <h1>&nbsp;&nbsp;RMT Service for administrator</h1>
            </div>
              
            
                <div id="logindisplay">
                welcome <%=((User)session.getAttribute("currentUser")).getName()%>,  <a href='../RMT'>logout</a>
            	</div>
            	<br/>
            	<div id="menucontainer">
            
                <ul id="menu">
                	<li><a href="adminHomeAction">Home</a></li>              
                    <li><a href='getProjectsForAdmin'>Projects</a></li>
                    <li><a href='accountManageAction?manageTarget=account'>Users</a></li>
                </ul>
            
            </div>
        </div>
   <div id='main'>
    <input class='pid' type='text' value="<s:property value='pid'/>"  style='display:none'/>
 
    <s:select name='from' list="{'feature','requirement','design','implementation','testcase'}" label='from'></s:select>
    <s:select name='to' list="{'feature','requirement','design','implementation','testcase'}" label='to'></s:select>
    <input type='button' value='view' />
   
   
   <div id='matrix'  style='height: 300'>
    
   </div>
   </div>
   <div class="push" style='height: 0'></div>
  	<div id="footer" style="background-color:#5c87b2;">
  	  <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:hidden;background-color:#5c87b2;">							
		<tbody style="border:hidden">
			<tr style="border: hidden">	
				<td width="160" style="border: hidden">&nbsp;</td>											   		<td>									
				<table width="60%" border="0" cellspacing="0" cellpadding="0" style="border:hidden;">	
					<tbody style="border: hidden">
						<tr style="border: hidden">
							<td height="20px"><font color='#ffffff'>©2012 Copyright NJU SEI RMT team</font></td>										
						</tr>										
						<tr style="border: hidden">											
							<td height="20px"><font color='#ffffff'>2012 graduation project: requirement management tool</font></td>	
						</tr>										
						<tr style="border: hidden">					
							<td height="20px"><font color='#ffffff'>project homepage：http://code.google.com/p/rmt-ss/</font></td>		
						</tr>									
					</tbody>
				</table>								
				</td>							
			</tr>						
		</tbody>
	</table>	
  	</div>
   </div>
  </body>
</html>
